// pages/work/apply/apply.js
Page({

    /**
     * 页面的初始数据
     */
    data: {
        index: 0,
        applyType: [
            {
                atype: 'start',
                aname: '上班卡'
            }, {
                atype: 'end',
                aname: '下班卡'
            }
        ],
        date: '2018-01-01',
        time: '12:01',
        atype: 'start',
        applyRemak: ''
    },
    bindDateChange: function (e) {
        console.log(e.detail.value)
        this.setData({
            date: e.detail.value
        })
    },
    bindTimeChange: function (e) {
        console.log(e.detail.value)
        this.setData({
            time: e.detail.value
        })
    },
    bindTypeChange: function (e) {
        this.setData({
            index: e.detail.value,
            atype: this.data.applyType[e.detail.value].atype
        })

    },
    bindRemarkChange: function (e) {
        console.log(e.detail.value)
        this.setData({
            applyRemak: e.detail.value

        })
    },
    submit: function () {
        console.log(this.data)
    },
})